﻿using Proxy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace ViewModel.VM.Control
{
    public class VM_WindowTextBoxDlg : BaseViewModel
    {
        public string Text { get { return text; } set { text = value;OnPropertyChanged();} }
        private string text;
        public string Title { get { return title; } set { title = value; OnPropertyChanged(); } }
        private string title;

        public VM_WindowTextBoxDlg(string title="输入对话框", string text="")
        {
            Title = title;
            Text= text;
            
        }

        public BaseCommand ConfirmCommand { get => new BaseCommand(ConfirmCommand_Executed); }
        public void ConfirmCommand_Executed(object obj)
        {
            (this.UIElement as Window).DialogResult = true;
            this.Close();
        }
    }
}
